{layout name="p/base"}
  <div id="page-wrapper">
    <div class="row">
      <div class="col-lg-12">
        <h1>房车管理 <small>房车信息列表</small></h1>
        <ol class="breadcrumb">
          <li><a href="index.php"><i class="fa fa-dashboard"></i> 管理首页</a></li>
          <li><a href="/caravan"><i class="fa fa-dashboard"></i> 房车信息列表</a></li>
          <li class="active"><i class="fa fa-table"></i> 回收站</li>
        </ol>
        <div class="alert alert-success alert-dismissable">
          <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
          这里可以恢复已删除的数据，彻底删除后将无法恢复，请谨慎操作 
        </div>
      </div>
    </div>
    <!-- /.row -->
    <div class="row">
      <div class="col-lg-12">
        <div class="form-group input-group" style="width:50%;float:right;">
          <input class="form-control" type="text">
          <span class="input-group-btn">
            
          </span>
        </div>
        <div class="btn-group">
          <a id='reset' class="btn btn-primary">恢复数据</a>
        </div>
        <div class="btn-group">
          <button type="button" id='forcedel' class="btn btn-default">彻底删除</button>
        </div>
        <div class="table-responsive">
          <table class="table table-bordered table-hover table-striped tablesorter">
            <thead>
              <tr>
                <th><div class="checker"><span><input type="checkbox" name=""></span></div></th>
                <th>时间</th>
                <th>房车编号</th>
                <th>房车名称</th>
                <th>房车品牌</th>
                <th>房车等级</th>
              </tr>
            </thead>
            <tbody>
            <form id='resetinfo' class="form-horizontal" role="form" action="/caravan/reset" method="post">
            <input type="hidden" id='method' name="_method" value="DELETE">
            {volist name='caravans' id='vo'}
              <tr>
                <td><div class="checker"><span><input type="checkbox" name="ids[]" value="{$vo.id}"></span></div></td>
                <td>{$vo.deleted_at}</td>
                <td>{$vo.number}</td>
                <td>{$vo.name}</td>
                <td>{$vo.carbrands.name}</td>
                <td>豪华型</td>
              </tr>
            {/volist}
            </form>
            </tbody>
          </table>
        </div> 
      </div>
      <div class="modal-footer">
            <input type="button" value="返回" class="btn btn-default"  onclick="javascript:history.back(-1);" />
        </div>
      <div class="col-sm-12">
        {$caravans->render()}
      </div>
    </div>
    <!-- /.row -->
    
  </div><!-- /#page-wrapper -->

<script type="text/javascript" src="/jquery.js"></script>
<script type="text/javascript">
  $(document).ready(function(){
    $("#reset").click(function(){
      $("#resetinfo").submit();
      });
    $("#forcedel").click(function(){
      $("#resetinfo").attr('action','/caravan/forcedel');
      $("#resetinfo").submit();
      });
    });
</script>